package cn.sxt.yjq.yxl.controller;

import javax.servlet.http.HttpServletRequest;

import cn.sxt.yjq.yxl.util.PageInfoUtil;

/**
 * Controller的父类
 * @author wangshSxt
 *
 */
public class BaseController
{
	/**
	 * 生成分页对象
	 * @param request
	 * @return
	 */
	protected PageInfoUtil proccedPageInfo(HttpServletRequest request)
	{
		PageInfoUtil pageInfoUtil = new PageInfoUtil();
		String page = request.getParameter("page");
		try
		{
			pageInfoUtil.setCurrentPage(Integer.valueOf(page));
		} catch (NumberFormatException e)
		{
		}
		return pageInfoUtil;
	}
}
